package com.ruoyi.hr.mapper;


import com.ruoyi.hr.domain.Departments;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DepartmentsMapper {

    public List<String> findSubdepartmentID(@Param("list") List<String> AllID);

    /**
     * 获取所有部门信息
     * @return
     */
    public List<Departments> findAllDepart();
    /**
     * 根据公司ID获取部门
     * @return
     */
    public List<Departments> findDep(Long compID);

    /**
     * 根据部门ID获取部门信息
     * @return
     */
    public Departments findDepOne(Long depID);


    /**
     * 获取分页公司信息
     * @return
     */
    public List<Departments> findAll( @Param("PageNum") int PageNum,@Param("PageSize") int PageSize,@Param("departments") Departments departments,@Param("AllID") List<String> AllID);


    /**
     * 获取公司总数
     * @return
     */
    public int findCount(@Param("departments") Departments departments,@Param("AllID") List<String> AllID);


    /**
     * 保存部门信息
     *
     * @param departments 部门信息
     * @return 结果
     */
    public int updateDepartments(Departments departments);

    /**
     * 新增部门信息
     *
     * @param departments 部门信息
     * @return 结果
     */
    public int insertDepartments(Departments departments);


    /**
     * 根据部门ID获取父部门ID
     *
     * @param depID 岗位ID
     * @return 结果
     */
    public Departments findadminDep(Long depID);

    public List<String> getDepRow();

}
